package cn.wolfcode.crm.web.controller;

import cn.wolfcode.crm.domain.Depot;
import cn.wolfcode.crm.query.MemberQueryObject;
import cn.wolfcode.crm.query.QueryObject;
import cn.wolfcode.crm.serivce.IDepotService;
import cn.wolfcode.crm.serivce.IMemberService;
import cn.wolfcode.crm.util.JSONResult;
import cn.wolfcode.crm.util.PageResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;


@Controller
@RequestMapping("memberAnalysis")
public class MemberAnalysisController {

    @Autowired
    private IMemberService memberService;

    @RequestMapping("view")
    public String view() throws Exception {
        return "memberAnalysis";
    }

    @RequestMapping("query")
    @ResponseBody
    public PageResult query(MemberQueryObject qo) throws Exception {
        PageResult query = memberService.query(qo);
        return query;
    }

}
